package com.xplay.xpocker.dvo;

import com.xplay.xpocker.entity.GameRuRoom;
import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@Data
public class AbstractRoom<T extends RoomRuleInterface, R extends RoomInfoInterface, L> extends GameRuRoom {
    private HashMap<String, Object> roomRule;
    private T rule;
    private R gameInfo;
    private List<L> logs;

    public void addLogs(L log) {
        if (logs == null) {
            logs = new ArrayList<>();
        }
        logs.add(log);
    }

}
